<template>
    <div id="talkDoctor">
        <van-sticky>
        <van-nav-bar title="在线问诊" left-text="返回" left-arrow @click-left="onClickLeft" />
        </van-sticky>
        <div id="talk_con">
            <Socket :username="user"></Socket>
        </div>
    </div>
</template>

<script setup lang="ts">
import Socket from './component/Socket.vue'
import {ref} from 'vue'
import { useRouter} from 'vue-router'
const user = ref('')
const router = useRouter()
import {onMounted} from 'vue'
onMounted(()=>{
    // user.value = route.query.username
    // console.log(JSON.parse(sessionStorage.getItem('user')['username'])||'')
    // console.log(JSON.parse(sessionStorage.getItem('user'))['username']);
    user.value = JSON.parse(sessionStorage.getItem('user'))['username']
})
const onClickLeft=()=>{
    router.back()
}
</script>

<style scoped>
#talkDoctor{
    width: 100vw;
    height:100vh;
    background:white;
    #talk_con{
        width:100vw;
        min-height:90vh;
        background-color: #f2f2f2;
        padding-top:20px;
    }
}
</style>